<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    
    {if  $group_id != 6}
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">任务类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="task_type" data-rule="required" class="form-control"  name="row[task_type]">
                <option value="1" >小红书任务</option>
                <!-- <option value="2" >抖音任务</option>
                <option value="3" >快手任务</option> -->
                <option value="4" >评论任务</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">任务所属:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-question_id"  data-rule="required" class="form-control selectpicker"  data-live-search="true" name="row[type]">
                {foreach name="type_arr" item="vo"}
                <option value="{$vo}">{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <!-- <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">账号人设:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="character_type" data-rule="required" class="form-control"  name="row[character_type]">
                <option value="1" >素人</option>
                <option value="2" >官方合作</option>
            </select>
        </div>
    </div> -->
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">类目：</label>
		<div class="col-xs-12 col-sm-6">
            <select id="c-question_id"  class="form-control selectpicker category"  data-live-search="true" name="row[category][]">
                {foreach name="category_list" item="vo"}
                <option value="{$vo.id}" >{$vo.name}</option>
                {/foreach}
            </select>
            <input   class="form-control form-control category1" placeholder="请输入该任务所属类目名称" name="row[category1]" type="text" value="" style="display: none;">
            <div class="luru" data-type="category1" style="margin-top: -28px;
            margin-left: 110%;
            width: 130px;
            background: #7b7575;
            color: #fff;
            text-align: center;
            height: 26px;
            line-height: 26px;
            border-radius: 10px;
            cursor: pointer;">手动录入/下拉选择</div>
		</div>
	</div>

    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">指定省：</label>
		<div class="col-xs-12 col-sm-6">
            <select   class="form-control selectpicker "  data-live-search="true" name="row[province][]">
                <option value="" >请选择</option>
                {foreach name="AreaList" item="vo"}
                <option value="{$vo.name}" >{$vo.name}</option>
                {/foreach}
            </select>
		</div>
	</div>
    <div class="form-group titel">
        <label for="username" class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control " rows="8" name="row[title]"
                                cols="50"  placeholder="请输入标题"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">内容:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control " rows="16" name="row[content]"
                                cols="50" placeholder="请输入内容"></textarea>
        </div>
    </div>
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">备注：</label>
		<div class="col-xs-12 col-sm-8">
			<input  class="form-control form-control" placeholder="如果需要用户艾特用户名或者指定ip发布,则在此说明" name="row[beizhu]" type="text" value="">
		</div>
	</div>
    
    <div class="form-group add_product" >
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">添加产品:</label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button"  class="btn btn-danger  product" style="float: left;"> 上传</button></span>
                        <span style="float: left;line-height: 30px;margin-left: 40px;">产品名称:<span class="title" style="color: #000;font-size: 16px;font-weight: 600;"></span></span>
                    </div> 
                </div>
        </div>
    </div>
    <input type="hidden" class="product_id" name="row[product_id]" value="">
    {/if}
    {if  $group_id == 6 && $is_province == 1}
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">指定省：</label>
		<div class="col-xs-12 col-sm-6">
            <select   class="form-control selectpicker "  data-live-search="true" name="row[province][]">
                <option value="" >请选择</option>
                {foreach name="AreaList" item="vo"}
                <option value="{$vo.name}" >{$vo.name}</option>
                {/foreach}
            </select>
		</div>
	</div>
    {/if}
    {if  $group_id == 6}
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">任务类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="task_type" data-rule="required" class="form-control"  name="row[task_type]">
                <option value="1" >小红书任务</option>
                <option value="4" >评论任务</option>
            </select>
        </div>
    </div>
    <div id="pinglun" style="display: none;">
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">小红书链接:</label>
            <div class="col-xs-12 col-sm-8">
                <input  class="form-control form-control" placeholder="请输入小红书链接" name="row[tl_title]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">生成评论数量:</label>
            <div class="col-xs-12 col-sm-8">
                <input  class="form-control form-control" placeholder="请输入评论数量" name="row[tl_num]" type="number" value="1">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">评论内容:</label>
            <div class="col-xs-12 col-sm-8">
                <textarea  class="form-control form-control" placeholder="请输入评论内容,如果多条评论请用英文字符分号分隔(;)  例如:这东西好;我喜欢;买它" name="row[tl_content]" type="text" value="" rows="5"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="c-birthday" class="control-label col-xs-12 col-sm-2">评论图片: <span style="color: red;">(选填)</span> </label>
            <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="d-avatars" data-rule="" class="form-control" size="50" name="row[tl_imgs]" type="text" value=""  style="display: none;">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button"  class="btn btn-danger plupload" data-input-id="d-avatars" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-preview-id="e-avatars"><i class="fa fa-upload"></i> 上传图片</button></span>
                        </div>
                        <span class="msg-box n-right" for="d-avatars"></span>
                    </div>
                    <ul class="row list-inline plupload-preview" id="e-avatars" style="width: 100%;"></ul>
            </div>
        </div>
    </div>
    <div class="xiao">
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">标题:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="title1"  class="form-control form-control" placeholder="请输入标题" name="row[title]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label for="username" class="control-label col-xs-12 col-sm-2">内容:</label>
            <div class="col-xs-12 col-sm-8">
                <textarea id="content1" class="form-control " rows="8" name="row[content]"
                                    cols="50" placeholder="请输入内容"></textarea>
            </div>
        </div>
        <div class="form-group form-input form-input-title">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="button"  class="btn ai" style="color: #fff;
        background-color: #4744f7;">使用AI生成</button>
            </div>
        </div>
        <div id="yulan"></div>
        <div class="form-group form-input form-input-title">
            <label class="control-label col-xs-12 col-sm-2">备注：</label>
            <div class="col-xs-12 col-sm-8">
                <input  class="form-control form-control" placeholder="如果需要用户艾特用户名或者指定ip发布,则在此说明" name="row[beizhu]" type="text" value="">
            </div>
        </div>
    </div>
    {/if}
    <div class="form-group xiao">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">任务图片: <span style="color: red;">(上传的第一张图默认为首图)</span> </label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-avatars" data-rule="" class="form-control" size="50" name="row[imgs]" type="text" value=""  style="display: none;">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatars" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatars"><i class="fa fa-upload"></i> 上传图片</button></span>
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatars" data-mimetype="mp4,mp3,avi,flv,wmv"  data-multiple="true" data-preview-id="p-avatars" ><i class="fa fa-upload"></i> 上传视频</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-avatars"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-avatars" style="width: 100%;"></ul>
        </div>
    </div>
    <div class="form-group imgs1" style="display: none;">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">任务图片B:</label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[imgs1]" type="text" value=""  style="display: none;">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="mp4,mp3,avi,flv,wmv"  data-maxsize="10M" data-multiple="true" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-avatar"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-avatar" style="width: 100%;"></ul>
        </div>
    </div>

    {if  $group_id != 6}
    <div class="form-group xiao">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">智能生成图片: <span style="color: red;">(上传图片后生成新的图片)</span> </label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="new"  style="display: none;">
                    <input id="c-avatarss" data-rule="" class="form-control" size="50" name="row[zn_imgs]" type="text" value=""  style="display: none;">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatarss" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatarss"><i class="fa fa-upload"></i> 上传图片</button></span>


                        <span><button type="button" id="shengcheng" class="btn"  >生成图片</button></span>
                        <span><input  class="form-control form-control ings" placeholder=""  type="text" value=""></span>
                        

                    </div>
                    <span class="msg-box n-right" for="c-avatarss"></span>
                </div>
                <ul class="row list-inline plupload-preview preview111" id="p-avatarss" style="width: 100%;"></ul>
        </div>
    </div>
    {/if}
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
